﻿@page
@using LocalizeMessagesAndErrors
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model Example1.RazorPages.IndividualAccounts.Pages.AuthRoles.EditModel
@inject ISimpleLocalizer SimpleLocalizer

<div class="h3">
    @SimpleLocalizer.LocalizeFormatted($"Editing {Model.Data.RoleName} role.", this)
</div>

<hr />
<div class="row">
    <form method="post">
        <div class="col-md-8">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            @Html.HiddenFor(x => x.Data.RoleName)
            <div>
                <label class="control-label">
                    @SimpleLocalizer.LocalizeString("Role description", this)
                </label>
                <input asp-for="Data.Description" class="form-control" />
                <span asp-validation-for="Data.Description" class="text-danger"></span>
            </div>
        </div>
        <div class="col-md-12">
            <p></p>

            <partial name="_PartialCreateEdit" for="@Model.Data" />
        </div>

        <div class="form-group">
            <input type="submit" value=@SimpleLocalizer.LocalizeString("Update", this)
                   class="btn btn-primary" />
            <a class="btn btn-secondary" asp-area="" asp-page=".\ListRoles">
                @SimpleLocalizer.LocalizeString("Cancel", this)
            </a>
        </div>
    </form>
</div>


@section Scripts {

    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
